﻿// ______________________________________________________________
//
// Liam O'Donnell
// Sound spot-effect/loop child sprite for the SoundManager class
// ______________________________________________________________
//

class com.spikything.audio.SoundSprite extends com.spikything.audio.SoundManager {

	// Constructor is identical to superclass
	function SoundSprite () { super() };

	// Remove the sound sprite when the sound completes
	public function onLoad ():Void {
		super.onLoad();
		this.snd.onSoundComplete = function(){ this.container.unloadMovie() };
	}

	// Remove the sound sprite on kill
	public function kill ():Void {
		super.kill();
		this.unloadMovie();
	}

	// Don't clear intervals on deInit
	private function deInit ():Void {
		snd.stop();
	}

}